/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.action.style;

import java.util.EventObject;

import javax.swing.JComponent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import net.abbp.report.model.cell.style.Style;

import com.reportgear.designer.action.StyleAction;

/**
 * @version 1.0 2011-3-24
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class StyleBackgroundAction extends StyleAction implements ChangeListener {

	public StyleBackgroundAction() {
		setName("背景颜色");
	}

	// public void applyStyle(Style style) {
	// // Object localObject =
	// getValue(ToolBarColorSelectionPane.class.getName());
	// // if ((localObject != null) && (localObject instanceof
	// ToolBarColorSelectionPane)) {
	// // Color localColor = ((ToolBarColorSelectionPane)
	// localObject).getColor();
	// // if ((paramStyle1.getBackground() != null) &&
	// (paramStyle1.getBackground() instanceof ColorBackground) &&
	// (ComparatorUtils.equals(localColor, ((ColorBackground)
	// paramStyle1.getBackground()).getColor()))) {
	// // return paramStyle1;
	// // }
	// // paramStyle1 =
	// paramStyle1.deriveBackground(ColorBackground.getInstance(localColor));
	// // }
	// // return paramStyle1;
	// }
	//
	// public void updateStyle(Style style) {
	// throw new UnsupportedOperationException("Not supported yet.");
	// }
	//
	// public void stateChanged(ChangeEvent evt) {
	// executeUndoAction(evt);
	// }
//	@Override
//	public JComponent createToolBarComponent() {
//		Object localObject = getValue(JideColorSplitButton.class.getName());
//		if ((localObject == null) || (!(localObject instanceof JideColorSplitButton))) {
//			JideColorSplitButton colorSplitBtn = new JideColorSplitButton(BaseUtils
//					.readIcon("m_edit/formatBrush.png"));
//			colorSplitBtn.setRolloverEnabled(false);
//			colorSplitBtn.setOpaque(false);
//			colorSplitBtn.setFocusable(false);
//
//			return colorSplitBtn;
//		} else {
//			return ((JComponent) localObject);
//		}
//	}

	public Style getStyle() {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	public void stateChanged(ChangeEvent e) {
		throw new UnsupportedOperationException("Not supported yet.");
	}

	@Override
	public boolean executeAction(EventObject evt) {
		throw new UnsupportedOperationException("Not supported yet.");
	}
}
